//用于显示选择任务接收者grid的窗体
var chooseReciverGridWin = Ext.create('Ext.window.Window', {
	title: '选择接收者',
	height: 400,
	width: 300,
	layout: 'fit',
	items: [chooseReceiverGrid],
	closeAction: 'hide', // 防止窗体被销毁
	buttons: [{
		text: '确认',
		itemId: 'chooseReciverGridWinBtn',
		disabled:true,
		listeners:[{
			click:function(){
				var selectArray =chooseReceiverGrid.getSelectionModel().getSelected(); //得到被选择的行的数组.
				var count=selectArray.items.length;
				var length=selectArray.items[0].data.name.length;
				var receiver0=selectArray.items[0].data.name;
				if(length>10)//如果收件人信息过长选则要在文本框里显示“等多少位的字样”	
					taskForm.down('#chooseReceiver').setValue(receiver0.substring(0,receiver0.indexOf('('))+'等'+count+'位');
				else
					taskForm.down('#chooseReceiver').setValue(receiver0);
				chooseReciverGridWin.close();
			}
		}]
	}]
});